package com.vinxin.app.boss.feign

import com.vinxin.app.boss.feign.config.BossFeignConfig
import com.vinxin.app.boss.model.TriggerChatRequest
import org.springframework.cloud.openfeign.FeignClient
import org.springframework.cloud.openfeign.SpringQueryMap
import org.springframework.http.HttpHeaders
import org.springframework.http.MediaType
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.PostMapping
import org.springframework.web.bind.annotation.RequestHeader
import org.springframework.web.bind.annotation.RequestParam

@FeignClient(name = "boss-service", url = "\${boss.url.base}", configuration = [BossFeignConfig::class])
interface BossFeign {

    @PostMapping("/zppassport/captcha/randkey")
    fun getCaptchaRandKey(): String

    @GetMapping("/zpweixin/qrcode/getqrcode")
    fun getQrcode(@RequestHeader headers: HttpHeaders, @RequestParam data: Map<String, Any>): String

    @GetMapping("/zpjob/job/recJobList")
    fun getStationList(@RequestHeader headers: HttpHeaders): String

    @GetMapping("/zpjob/rec/geek/list")
    fun getJobhunterList(@RequestHeader headers: HttpHeaders, @RequestParam data: Map<String, Any>): String

    @PostMapping("/zpjob/chat/start", consumes = [MediaType.APPLICATION_FORM_URLENCODED_VALUE])
    fun triggerChat(@RequestHeader headers: HttpHeaders, @SpringQueryMap data: TriggerChatRequest): String

    @GetMapping("zpblock/privilege/daily/used/detail")
    fun getTriggerChatUsed(@RequestHeader headers: HttpHeaders, @RequestParam data: Map<String, Any>): String

    @GetMapping("zpblock/recommend/filters")
    fun getFilters(@RequestHeader headers: HttpHeaders, @RequestParam data: Map<String, Any>): String

}